<?php
require(dirname(__FILE__)."/"."../inc/common.inc.php");
admin(14);
?>

<!DOCTYPE HTML>
<html>
<head>
<meta charset="utf-8">
<meta name="renderer" content="webkit|ie-comp|ie-stand">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1.0,maximum-scale=1.0,user-scalable=no" />
<meta http-equiv="Cache-Control" content="no-siteapp" />
<!--[if lt IE 9]>
<script type="text/javascript" src="js/html5.js"></script>
<script type="text/javascript" src="js/respond.min.js"></script>
<script type="text/javascript" src="js/PIE_IE678.js"></script>
<![endif]-->
<link type="text/css" rel="stylesheet" href="css/H-ui.css"/>
<link type="text/css" rel="stylesheet" href="css/H-ui.admin.css"/>
<link type="text/css" rel="stylesheet" href="font/font-awesome.min.css"/>
<!--[if IE 7]>
<link href="font/font-awesome-ie7.min.css" rel="stylesheet" type="text/css" />
<![endif]-->
<title>开奖列表</title>
</head>
<body>
<?php
if($del){
	if (empty($id)){
		refreshto($FROMURL,'删除失败!',2);
	}
 
        $query = $db->query("DELETE FROM chen_admin WHERE u_id='{$id}'");
        logo('删除人员');
        refreshto($FROMURL,'删除成功!',2);
    
}
?>
<nav class="Hui-breadcrumb"> <?=get_category(14)?> <a class="btn btn-success radius r mr-20" style="line-height:1.6em;margin-top:3px" href="javascript:location.href='?';" title="刷新" ><i class="icon-refresh"></i></a></nav>
<div class="pd-20">
  <div class="">
    <form class="Huiform" method="get" action="?" >
    <input type="hidden" name="page" value="1">
      <input type="text" placeholder="输入关键词查询" autocomplete="off" value="<?=$keyword?$keyword:''?>" name="keyword"  class="input-text">
     
      <button type="submit" class="btn btn-success" id="12" name="12" value="12" ><i class="icon-plus"></i> 搜索</button>

     
    </form>
</div>
     <table class="table table-border table-bordered table-bg">
         <thead>
	         <tr>        
	        <td rowspan="2">序号</td> 
	        <td rowspan="2" width="60">期号</td>
	        <td rowspan="2">试机号</td>
	        <td rowspan="2">开奖号</td>
	        <td rowspan="2">和值</td>
	        <td colspan="3">试机号摆球顺序</td>      
	        <td colspan="3">开奖号摆球顺序</td>
	      </tr> 
	      <tr>
	          <td >百位</td>
	          <td >十位</td>
	          <td >个位</td>       
	          <td >百位</td>
	          <td >十位</td>
	          <td >个位</td>          
   		   </tr>
         </thead>
         <tbody>
         <?php
         $rows=20;
         if($page<1){
             $page=1;
         }
         $min=($page-1)*$rows;
         if($adminarr['u_gid']==0){
             $isql.="";
         }
         if($keyword!=''  ){
             $isql.=" and ( a.u_name like '%{$keyword}%'  or a.u_title like '%{$keyword}%')";
         }
         if($gid!=''  ){
             $isql.=" and  a.u_group='$gid' ";
         }
         if($deptchoice!=""){
             $isql.=" and a.u_gid = '$deptchoice'";
         } 
        
         $rsd=$db->query("select * from {$pre}3d_map where 1=1 order by date desc LIMIT $min,$rows");
		while($rs=$db->fetch_array($rsd)){
			echo '<tr>'.chr(10);
			echo ' <td>'.$rs['sn'].'</td>'.chr(10);
			echo ' <td>'.$rs['date'].'</td>'.chr(10);
			echo ' <td>'.$rs['testnum'].'</td>'.chr(10);
			echo ' <td>'.$rs['lotnum'].'</td>'.chr(10);
			echo ' <td>'.$rs['total'].'</td>'.chr(10);
			echo ' <td>'.str_replace($rs['t_hund_red'],'<font color=#ff0000>'.$rs['t_hund_red'].'</font>',$rs['t_hund']).'</td>'.chr(10);
			echo ' <td>'.str_replace($rs['t_decade_red'],'<font color=#ff0000>'.$rs['t_decade_red'].'</font>',$rs['t_decade']).'</td>'.chr(10);
			echo ' <td>'.str_replace($rs['t_bit_red'],'<font color=#ff0000>'.$rs['t_bit_red'].'</font>',$rs['t_bit']).'</td>'.chr(10);
			echo ' <td>'.str_replace($rs['l_hund_red'],'<font color=#ff0000>'.$rs['l_hund_red'].'</font>',$rs['l_hund']).'</td>'.chr(10);
			echo ' <td>'.str_replace($rs['l_decade_red'],'<font color=#ff0000>'.$rs['l_decade_red'].'</font>',$rs['l_decade']).'</td>'.chr(10);
			echo ' <td>'.str_replace($rs['l_bit_red'],'<font color=#ff0000>'.$rs['l_bit_red'].'</font>',$rs['l_bit']).'</td>'.chr(10);
			echo '</tr>'.chr(10);
		}

         ?>
         <tr class="text-c">
             <td colspan="11"><?=getpage(" {$pre}3d_map  ","where 1=1 ","?keyword=$keyword",$rows)?></td>
         </tr>
         </tbody>
     </table>

</div>

<script type="text/javascript" src="js/jquery.min.js"></script>
<script type="text/javascript" src="js/Validform_v5.3.2_min.js"></script> 
<script type="text/javascript" src="layer/layer.min.js"></script>
<script type="text/javascript" src="js/H-ui.js"></script>
<script type="text/javascript" src="js/H-ui.admin.js"></script>
<script type="text/javascript">
$(".Huiform").Validform(); 
</script>
</body>
</html>